<?php include 'application/views/header.php' ?>
<h4 class="page-title">Danh sách đăng ký tham gia ngày hội</h4>
<table width="100%" class="list list-contacts">
    <tr>
        <th>STT</th>
        <th>Công ty</th>
        <th>Điện thoại</th>
        <th>Email</th>
        <th>Người liên hệ</th>
        <th>Thao tác</th>
    </tr>
    <?php $index = 1 ?>
    <?php foreach($registerfastival as $register): ?>
    <tr>
       <td><?php echo $index++ ?></td>
       <td><?php echo $register['Company'] ?></td>
       <td><?php echo $register['Phone'] ?></td>
       <td><?php echo $register['Email'] ?></td>
       <td><?php echo $register['ContactPerson'] ?></td>             
       <td>
            <a href="<?php echo base_url() ?>register/view/<?php echo $register['RegisterFastivalId'] ?>.html">
                <div class="actView">View</div>
            </a>
            <a href="#">
                <div class="actDelete" contactId="<?php echo $register['RegisterFastivalId'] ?>">Xóa</div>
            </a>
       </td>
    </tr>
    <?php endforeach; ?>
</table>
<?php include 'application/views/footer.php' ?>

<script>
$('.btnAdd').click(function(){
    window.location.href = '<?php echo base_url() ?>contact/add.html'; 
});
$('.actDelete').click(function(){
    var contactId = $(this).attr('contactId');
    if(confirm("Bạn có muốn xóa không?")){
        window.location.href = '<?php echo base_url() ?>register/delete/'+contactId;
    }
    return false;
})
</script>